Coverity ID: 1215178
authorPaul Durrant <paul.durrant@citrix.com>
Mon, 26 May 2014 10:27:51 +0000 (12:27 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 26 May 2014 10:27:51 +0000 (12:27 +0200)
commit16591db3765a228916335de7a2885d650f9dc79d
treeb18896ce497033439129d12a81723cfcd10b20a1
parentfca69b1fc606ece62430076ca4a157e4bed749a8
Coverity ID: 1215178

There are two problems with initializetion of the ioreq_t in hvmemul_do_io():

- vp_eport is uninitialized (because it doesn't need to be) but because the
  struct is the subject of a copy in hvm_send_assist_req(), this is flagged
  as a problem.
- dir, addr, data_is_ptr, and data may be uninitialized when the struct is
  passed to hvmtrace_io_assist(). This is clearly a bug, so the initializ-
  ation of at least those fields needs to be moved earlier.

This patch fixes both these problems.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/emulate.c